/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-06-29 17:42:14
 * @LastEditTime: 2019-06-30 17:54:42
 * @Description: http://www.sbotlp.com.cn
 */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import { Reducers } from 'src/app/redux/reducers/index.reducers';
import { HashRouter } from 'react-router-dom';
import { LocaleProvider } from 'antd';
import thunk from 'redux-thunk';
import { App } from './app/routers/App';
import registerServiceWorker from './registerServiceWorker';
import './assets/style/style.scss';
import zhCN from 'antd/es/locale-provider/zh_CN';
import * as moment from 'moment';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
const store = createStore(
  Reducers,
  compose(
    applyMiddleware(thunk),
    window['devToolsExtension'] ? window['devToolsExtension']() : f => f
  )
);
ReactDOM.render(
  <Provider store={store}>
    <HashRouter>
      <LocaleProvider locale={zhCN}>
        <App/>
      </LocaleProvider>
    </HashRouter>
  </Provider>,
  document.getElementById('root') as HTMLElement
);
registerServiceWorker();
